﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ExtractFanIn
{
    /// <summary>
    /// Author: Aaron Lumaksana
    /// Date: 16/08/10
    /// A node has a class type, name, fan in and fan out.
    /// </summary>
    class Node
    {
        private string _name;
        private char _classType;
        private List<Node> _fanIn = new List<Node>();


        private List<Node> _fanOut = new List<Node>();


        public Node(string aName)
        {
            _name = aName;
        }

        internal List<Node> FanIn
        {
            get { return _fanIn; }
        }

        public char ClassType
        {
            get { return _classType; }
            set { _classType = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public int FanInCount
        {
            get { return _fanIn.Count; }
        }

        public int FanOutCount
        {
            get { return _fanOut.Count; }
        }

        public void AddFanIn(Node aN)
        {

                _fanIn.Add(aN);

        }

        public void AddFanOut(Node aN)
        {
            

                _fanOut.Add(aN);   

        }



    }
}
